#include "angular_displacement.h"
//3680 745 0.034
extern ADC_HandleTypeDef hadc2;
uint32_t ang_buf[2];
 void SCAN_ANG()
{

	ang_buf[0]=HAL_ADC_GetValue(&hadc2);
	
	HAL_ADC_PollForConversion(&hadc2,0xffff);

	//vTaskDelay(1);
		if(ang_buf[0]<745)
  		ang_buf[0]=745;
	G_REG[RT_ANGLE].value=G_REG[reg_YL1].value=(uint16_t)((float)(ang_buf[0]-745.0)*0.034*100);
//	G_REG[reg_YL2].value=ang_buf[1];
	
	
}

